<template>
  <view class="introduce">
    <!-- <view class="introduce-swiper">
      <BannerSwiper :List="list" />
    </view> -->
    <view class="content" style="padding: 40rpx 16rpx">
      <view class="title"
        >中心荟简介
        <view class="line" />
      </view>

      <view>
        <image :src="face_image_id_top"></image>
        <view style="text-align:start">
          {{ text }}
        </view>
      </view>
    </view>
  </view>
</template>

<script>
import "./index.scss";
import Taro from "@tarojs/taro";
import img1 from "../../assets/image/build1.png";
import BannerSwiper from "../../components/bannerswiper/index";
import request,{getImage} from "../../utils/request"
export default {
  components: {
    BannerSwiper: BannerSwiper,
  },
  data() {
    return {
      face_image_id_top: "",
      text: "",
      list: [{ image: img1 }, { image: img1 }, { image: img1 }],
      datalist: [
        {
          id: 1,
          imgurl: img1,
          title: "手机话费100元券",
          category: "三大运营商通用",
          startTime: "",
          endTime: "",
          explain: "可与其它活动优惠同时享受。",
        },
        {
          id: 2,
          imgurl: img1,
          title: "手机话费100元券",
          category: "三大运营商通用",
          startTime: "",
          endTime: "",
          explain: "可与其它活动优惠同时享受。",
        },
        {
          id: 3,
          imgurl: img1,
          title: "手机话费100元券",
          category: "三大运营商通用",
          startTime: "",
          endTime: "",
          explain: "可与其它活动优惠同时享受。",
        },
      ],
    };
  },
  created(){
    this.getIntroduction()
  },
  methods: {
    getIntroduction(){
      request('get','/api/rest/introduction.htm').then((res)=>{
        console.log(res,'getIntroduction')
        this.face_image_id_top = getImage(res.face_image_id)
        this.text = res.introduction
      })
    },
    todetail(item) {
      Taro.navigateTo({ url: item.path });
    },
  },
};
</script>
